<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册-永奥会务1.0</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link rel="shortcut icon" href="__CDN__/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="__CDN__/css/font.css">
    <link rel="stylesheet" href="__CDN__/css/xadmin.css">
    <script type="text/javascript" src="__CDN__/js/jquery.min.js"></script>
    <script src="__CDN__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__CDN__/js/xadmin.js"></script>

</head>
<body class="login-bg">

<div class="login">
    <div class="message">永奥会务1.0-注册</div>
    <div id="darkbannerwrap"></div>

    <form method="post" class="layui-form" id="login">
        <input name="email" placeholder="邮箱"  type="text" lay-verify="required" class="layui-input" >
        <hr class="hr15">
        <input name="mobile" lay-verify="required" placeholder="手机号"  type="text" class="layui-input">
        <hr class="hr15">
        <input name="password" lay-verify="required" placeholder="密码"  type="password" class="layui-input">
        <hr class="hr15">
        <input name="verification_code" lay-verify="required" placeholder="手机验证码"  type="text" class="layui-input">
        <hr class="hr15">
        <input name="contact" lay-verify="required" placeholder="联系人"  type="text" class="layui-input">
        <hr class="hr15">
        <input name="institution" lay-verify="required" placeholder="机构名称"  type="text" class="layui-input">
        <hr class="hr15">
        <input name="address" lay-verify="required" placeholder="机构地址"  type="text" class="layui-input">
        <hr class="hr15">
        <input value="注册" lay-submit lay-filter="login" style="width:100%;" type="submit">
        <hr class="hr20" >
    </form>
</div>

<script>
    $(function  () {
        layui.use('form', function(){
            var form = layui.form;
            //监听提交
            form.on('submit(login)', function(data){
                $.ajax({
                    dataType : 'json',
                    type : 'POST',
                    url : '{:url("Common/register")}',
                    async: false,
                    data : $('#login').serialize(),
                    success : function(msg){
                        layer.msg(msg.msg,{offset: '50px',anim: 1});
                        if(msg.code == 1) {
                            setTimeout(function() {
                                location.href = msg.url;
                            }, 1500);
                        }
                    },
                    error : function(XMLHttpRequest, textStatus, errorThrown) {
                        alert(XMLHttpRequest.status + "," + textStatus);
                    }
                });
                return false;
            });
        });
    })


</script>


<!-- 底部结束 -->
<script>
    //百度统计可去掉
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
</body>
</html>